import Layout from '@/layout/index.vue'
import { RouteRecordRaw } from 'vue-router'

const dataRoutes: RouteRecordRaw[] = [
	// Dashboard
	{
		path: '/',
		component: Layout,
		redirect: '/welcome',
		meta: { title: 'Dashboard', icon: 'DataBoard', index: 1 },
		children: [
			// 欢迎页
			{
				path: '/welcome',
				name: 'welcome',
				component: () => import('@/views/dashboard/welcome.vue'),
				meta: { title: '欢迎页' }
			},
			// Dashboard
			{
				path: '/dashboard',
				name: 'dashboard',
				component: () => import('@/views/dashboard/index.vue'),
				meta: { title: 'Dashboard' }
			},
			// 添加商品
			{
				path: '/addGoods',
				name: 'addGoods',
				component: () => import('@/views/dashboard/addGoods.vue'),
				meta: { title: '添加商品' }
			}
		]
	}
]

export default dataRoutes
